//
//  DeclareViewController.m
//  DongChiDaChiProject1
//
//  Created by lanou3g on 15/10/28.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "DeclareViewController.h"

@interface DeclareViewController ()

@end

@implementation DeclareViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
   // self.title = self.titleName;
     self.view.backgroundColor = [UIColor whiteColor];
   // self.view.backgroundColor = [[UIColor magentaColor] colorWithAlphaComponent:0.05];
    [self addLabel];
    [self addBar];
}

#pragma mark - 添加bar
- (void)addBar
{
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithTitle:@"我的" style:UIBarButtonItemStylePlain target:self action:@selector(returnToLast:)];
    leftItem.tintColor = [UIColor colorWithHue:0.8 saturation:1 brightness:0.7 alpha:1];
    self.navigationItem.leftBarButtonItem = leftItem;
    
    [self.navigationController.navigationBar setTranslucent:NO];
}

- (void)returnToLast:(UIBarButtonItem *)barItem
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)addLabel
{
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - kWidthFitParameter * 150) / 2, 20 * kWidthFitParameter, 150 * kWidthFitParameter, 40 * kWidthFitParameter)];
    //label.backgroundColor = [UIColor redColor];
    label.text = @"免责声明";
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont        systemFontOfSize:25 * kWidthFitParameter];
    [self.view addSubview:label];
    
    UILabel *wenbenLabel = [[UILabel alloc] initWithFrame:CGRectMake(10 * kWidthFitParameter, label.bottom + 15 * kWidthFitParameter, kScreenWidth - 20 * kWidthFitParameter, 170 * kWidthFitParameter)];
   // wenbenLabel.backgroundColor = [UIColor whiteColor];
    wenbenLabel.text = @"  1、本产品为非盈利产品，部分数据来自与网络，对于部分数据与其他app重复为不可抗拒的因素；\n  2、对于不可抗力或黑客攻击、通讯线路中断等不可控制造成的原因造成的网络服务终端或其他缺陷，导致用户不能正常使用App，本公司不承担任何责任";
    wenbenLabel.font = [UIFont systemFontOfSize:15 * kWidthFitParameter];
    wenbenLabel.textColor = [[UIColor blackColor] colorWithAlphaComponent:0.7];
    wenbenLabel.numberOfLines = 0;
    [self.view addSubview:wenbenLabel];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
